Dart.Mail Namespace > Multipart Class > Multipart Constructor : Multipart Constructor(String,String,FileInfo[]) |
Public Function New( _ ByVal text As String, _ ByVal html As String, _ ByVal htmlResources() As FileInfo _ )
Dim text As String Dim html As String Dim htmlResources() As FileInfo Dim instance As New Multipart(text, html, htmlResources)
public: Multipart( String^ text, String^ html, array<FileInfo^>^ htmlResources )
Exception | Description |
---|---|
System.ArgumentException | htmlResources missing reference to an HTML link. |
System.ArgumentNullException | html cannot be null or empty. |
This constructor is used to create HTML email. multipart/alternative and/or multipart/related parts are created to represent the parameters provided.
If text is null or empty, then html and htmlResources are used to create either a text/html part or a mulipart/related part that contains a text/html part. Otherwise, Part.ContentType is set to "multipart/alternative" and 2 parts (text/plain, and a text/html or multipart/related) are created and saved in Parts.
If htmlResources is null, then html is represented as a single Htmlpart. Otherwise, a new "multipart/related" Multipart is created and initialized with html and linked htmlResources.